<?php
/**
 * Created by PhpStorm.
 * User: zhongyb
 * Date: 2016/6/6
 * Time: 16:38
 */
namespace common\entities\common;

use common\entities\ConfigEntity;
use Yii;

/**
 * This is the model class for table "myscrm_asyncoperation".
 *
 * @property string $myAsyncOperationId
 * @property string $CreatedOn
 * @property string $CreatedBy
 * @property string $ModifiedOn
 * @property string $ModifiedBy
 * @property string $VersionNumber
 * @property string $Name
 * @property string $OperationType
 * @property string $MessageName
 * @property string $CorrelationId
 * @property string $CorrelationUpdatedTime
 * @property string $Data
 * @property string $DependencyToken
 * @property integer $Depth
 * @property integer $ErrorCode
 * @property string $ExecutionTimespan
 * @property string $Message
 * @property string $FriendlyMessage
 * @property string $HostId
 * @property string $PostponeUntil
 * @property string $RecurrencePattern
 * @property string $RecurrenceEndTime
 * @property string $PrimaryEntityId
 * @property string $RegardingObjectId
 * @property string $RequestId
 * @property integer $RetryCount
 * @property string $ScheduleTime
 * @property string $StartedOn
 * @property string $CompletedOn
 * @property integer $State
 * @property integer $Status
 * @property string $WorkflowActivationId
 * @property boolean $WorkflowIsBlocked
 * @property string $WorkflowStageName
 * @property string $WorkflowState
 * @property string $OrganizationId
 * @property string $BizStartDate
 * @property string $BizEndDate
 */
class MyscrmAsyncoperationEntity extends ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_asyncoperation';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['myAsyncOperationId'], 'required'],
            [['CreatedOn', 'ModifiedOn', 'VersionNumber', 'CorrelationUpdatedTime', 'PostponeUntil', 'RecurrenceEndTime', 'ScheduleTime', 'StartedOn', 'CompletedOn', 'BizStartDate', 'BizEndDate'], 'safe'],
            [['Depth', 'ErrorCode', 'RetryCount', 'State', 'Status'], 'integer'],
            [['ExecutionTimespan'], 'number'],
            [['WorkflowIsBlocked'], 'boolean'],
            [['myAsyncOperationId', 'CreatedBy', 'ModifiedBy', 'OperationType', 'CorrelationId', 'PrimaryEntityId', 'RegardingObjectId', 'RequestId', 'WorkflowActivationId', 'OrganizationId'], 'string', 'max' => 36],
            [['Name', 'MessageName', 'DependencyToken', 'HostId', 'RecurrencePattern', 'WorkflowStageName', 'WorkflowState'], 'string', 'max' => 512],
            [['Data', 'Message', 'FriendlyMessage'], 'string', 'max' => 2048]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'myAsyncOperationId' => 'My Async Operation ID',
            'CreatedOn' => 'Created On',
            'CreatedBy' => 'Created By',
            'ModifiedOn' => 'Modified On',
            'ModifiedBy' => 'Modified By',
            'VersionNumber' => 'Version Number',
            'Name' => 'Name',
            'OperationType' => 'Operation Type',
            'MessageName' => 'Message Name',
            'CorrelationId' => 'Correlation ID',
            'CorrelationUpdatedTime' => 'Correlation Updated Time',
            'Data' => 'Data',
            'DependencyToken' => 'Dependency Token',
            'Depth' => 'Depth',
            'ErrorCode' => 'Error Code',
            'ExecutionTimespan' => 'Execution Timespan',
            'Message' => 'Message',
            'FriendlyMessage' => 'Friendly Message',
            'HostId' => 'Host ID',
            'PostponeUntil' => 'Postpone Until',
            'RecurrencePattern' => 'Recurrence Pattern',
            'RecurrenceEndTime' => 'Recurrence End Time',
            'PrimaryEntityId' => 'Primary Entity ID',
            'RegardingObjectId' => 'Regarding Object ID',
            'RequestId' => 'Request ID',
            'RetryCount' => 'Retry Count',
            'ScheduleTime' => 'Schedule Time',
            'StartedOn' => 'Started On',
            'CompletedOn' => 'Completed On',
            'State' => 'State',
            'Status' => 'Status',
            'WorkflowActivationId' => 'Workflow Activation ID',
            'WorkflowIsBlocked' => 'Workflow Is Blocked',
            'WorkflowStageName' => 'Workflow Stage Name',
            'WorkflowState' => 'Workflow State',
            'OrganizationId' => 'Organization ID',
            'BizStartDate' => 'Biz Start Date',
            'BizEndDate' => 'Biz End Date',
        ];
    }
}